package QL;

import java.util.List;
import java.util.ArrayList;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class ButlerBlockAccountInfo implements IQLResponse
{
    /// <summary>
    /// 玩家Id
    /// </summary>
    public long UserId;

    /// <summary>
    /// 玩家昵称
    /// </summary>
    public String Nickname;

    /// <summary>
    /// 是否是商人
    /// </summary>
    public boolean IsBusinessman;

    /// <summary>
    /// 玩家等级
    /// </summary>
    public long Level;

    /// <summary>
    /// 封禁类型 1永久封禁 2限时封禁
    /// </summary>
    public long BlockType;

    /// <summary>
    /// 封禁时长，单位秒。仅在限时封禁时有意义。
    /// </summary>
    public long BlockDuration;

    /// <summary>
    /// 操作时间
    /// </summary>
    public String OperationTime;

    /// <summary>
    /// 封禁原因
    /// </summary>
    public String OperationReason;

    /// <summary>
    /// 操作人
    /// </summary>
    public String Operator;

    @Override
    public void DeserializeFromJson(JSONObject jsonObj)
    {
        JSONObject t = jsonObj;
        if (t.has("user_id"))
            UserId = t.getLong("user_id");
        if (t.has("nickname"))
            Nickname = t.getString("nickname");
        if (t.has("is_businessman"))
            IsBusinessman = t.getBoolean("is_businessman");
        if (t.has("level"))
            Level = t.getLong("level");
        if (t.has("block_type"))
            BlockType = t.getLong("block_type");
        if (t.has("block_duration"))
            BlockDuration = t.getLong("block_duration");
        if (t.has("operation_time"))
            OperationTime = t.getString("operation_time");
        if (t.has("operation_reason"))
            OperationReason = t.getString("operation_reason");
        if (t.has("operator"))
            Operator = t.getString("operator");
    }
}
